import request from '@/utils/request'

// 查询团购活动列表
export function listGroupbying(query) {
  return request({
    url: '/ly/groupbying/list',
    method: 'get',
    params: query
  })
}

// 查询团购活动详细
export function getGroupbying(id) {
  return request({
    url: '/ly/groupbying/' + id,
    method: 'get'
  })
}

// 新增团购活动
export function addGroupbying(data) {
  return request({
    url: '/ly/groupbying',
    method: 'post',
    data: data
  })
}

// 修改团购活动
export function updateGroupbying(data) {
  return request({
    url: '/ly/groupbying',
    method: 'put',
    data: data
  })
}

// 删除团购活动
export function delGroupbying(id) {
  return request({
    url: '/ly/groupbying/' + id,
    method: 'delete'
  })
}
